using System;
using System.Collections.Generic;

using PlugNT.Common;
using PlugNT.Cms.Custom;
using PlugNT.Cms.BLL;
using PlugNT.Cms.Model;
using PlugNT.App.Shop.Model;

namespace PlugNT.App.Shop
{




    public class ShopConfig 
    {

        public const string assName = "SHOP";
        public const string assVersion = "3.6";

        public readonly static bool assSetuped = false;
        public readonly static int sysModelId = 0;

        private static ShopModelInfo _shopModelInfo = null;

        static ShopConfig()
        {
            assSetuped = AppPlugin.GetAppModel("PlugNT.App.Shop").setuped;
            sysModelId = AppPlugin.GetAppModel("PlugNT.App.Shop").sysModelId;
        }



        public static ShopModelInfo GetShopModelInfo()
        {
            if (_shopModelInfo == null)
            {
                _shopModelInfo = (ShopModelInfo)SysModel.GetSysModelInfoFromDictionary(sysModelId);
            }
            return _shopModelInfo;
        }

        public static bool SetShopModelInfo(string arr)
        {
            _shopModelInfo.arr_str = arr;
            _shopModelInfo.ArrBind();
            return new SysModel().UpdateArr(sysModelId, arr);
        }

    }


}

